package com.wutianyi.jackson.annotation;

import java.io.File;
import java.io.IOException;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

/**
 * @author hanjiewu 多态
 */
public class Example2
{
    public static void main(String[] args) throws JsonParseException, JsonMappingException, IOException
    {
        ObjectMapper objectMapper = new ObjectMapper();
        Zoo zoo = objectMapper.readValue(new File("input_4.json"), Zoo.class);
        System.out.println(objectMapper.writeValueAsString(zoo));
    }
}
